﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;
using Entity;
using System.Data;

namespace Controller
{
    public partial class Controller_Room : Component
    {
        Entity_Room ent_room = new Entity_Room();
        public Controller_Room()
        {
            InitializeComponent();
        }

        public Controller_Room(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }
        public DataSet ListRoomType()
        {
            return ent_room._ListRoomType();
        }
        public bool AddRoomType(string maPhong, string tenPhong, string giaPhong, string mieuta)
        {
            return ent_room._AddRoomType(maPhong,tenPhong,giaPhong,mieuta);
        }
        public bool Delete_RoomType(string id)
        {
            return ent_room._delete_roomType(id);
        }
        public bool InsertRoom(string RoomID, string RoomTypeID, string RoomName, int NumberCustomer, bool TinhTrang, string Note)
        {
            return ent_room._addRoom(RoomID, RoomTypeID, RoomName, NumberCustomer, TinhTrang, Note);

        }
        public DataTable ListAllRoom()
        {
            return ent_room._ListAllRoom().Tables[0];
        }

        public bool Update_room(string RoomID, string RoomTypeID, string RoomName, int NumberCustomer, bool TinhTrang, string Note)
        {
            return ent_room._Update_Room(RoomID, RoomTypeID, RoomName, NumberCustomer, TinhTrang, Note);
        }

        public bool Delete_room(string id)
        {
            return ent_room._Delete_room(id);
        }

        public bool Update_roomType(string maPhong, string tenPhong, string giaPhong, string mieuta)
        {
            return ent_room._Update_roomtype(maPhong, tenPhong, giaPhong, mieuta);       
        }

        public DataSet RoomStatus(int ngay, int thang, int nam)
        {
            return ent_room._RoomStatus(ngay, thang, nam);
        }

        public DataSet thongkeRoom(string id)
        {
            return ent_room._thongkeRoom(id);
        }

        public DataSet TrangthaiPhong(string ngayDat, string ngayTra)
        {
            return ent_room._TrangthaiPhong(ngayDat, ngayTra);
        }
    }
}
